﻿using AngleSharp.Dom;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using WomanMotion.WebApi.Infrastructure.Ioc;
using WomanMotion.WebApi.Model.Dtos.Authoritys;
using WomanMotion.WebApi.Model.Dtos.Carousel;
using WomanMotion.WebApi.Model.Dtos.Comment;
using WomanMotion.WebApi.Model.Entitys;

namespace WomanMotion.WebApi.Service.IService
{
    public interface IAuthoritysService : IBaseCRUDService<Authoritys, AuthoritysVM, UpdateAuthoritysDTO, CreatedAuthoritysDTO>, ITransientDependency
    {
        /// <summary>
        /// 查询所有权限集合
        /// </summary>
        /// <returns></returns>
        Task<List<AuthoritysPageVM>> GetAuthoritysListAsync();

        /// <summary>
        /// 查询符合条件的权限集合
        /// </summary>
        /// <param name="expression">查询条件</param>
        /// <returns></returns>
        Task<List<AuthoritysPageVM>> GetAuthoritysListAsync(Expression<Func<AuthoritysPageVM, bool>> expression);

        /// <summary>
        /// 查询符合条件的单条记录
        /// </summary>
        /// <param name="expression">查询条件</param>
        /// <returns></returns>
        Task<AuthoritysPageVM> GetAuthoritysFirstAsync(Expression<Func<AuthoritysPageVM, bool>> expression);

        /// <summary>
        /// 同步符合条件的多表连接单条记录
        /// </summary>
        /// <param name="expression">查询条件</param>
        /// <returns></returns>
        AuthoritysPageVM GetAuthoritysFirst(Expression<Func<AuthoritysPageVM, bool>> expression);

        /// <summary>
        ///获取权限Tree数据
        /// </summary>
        /// <returns></returns>
        Task<List<AuthoritysTreeVM>> GetTreeListAsync();
    }
}